import 'package:json_annotation/json_annotation.dart';
import '../model/video_item_model.dart';

part 'community_video_model.g.dart';


@JsonSerializable()
class CommunityVideoModel extends Object {

  @JsonKey(name: 'issueList')
  List<IssueList>? issueList;

  @JsonKey(name: 'itemList')
  List<IssueList>? itemList;

  @JsonKey(name: 'count')
  num? count;

  @JsonKey(name: 'total')
  num? total;

  @JsonKey(name: 'nextPageUrl')
  String? nextPageUrl;

  CommunityVideoModel(this.issueList,this.itemList,this.count,this.total,this.nextPageUrl);

  factory CommunityVideoModel.fromJson(Map<String, dynamic> srcJson) => _$CommunityVideoModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$CommunityVideoModelToJson(this);

}


@JsonSerializable()
class IssueList extends Object {

  @JsonKey(name: 'releaseTime')
  int? releaseTime;

  @JsonKey(name: 'type')
  String type;

  @JsonKey(name: 'id')
  int? id;

  @JsonKey(name: 'data')
  VideoData? data;

  @JsonKey(name: 'date')
  int? date;

  @JsonKey(name: 'publishTime')
  int? publishTime;

  @JsonKey(name: 'itemList')
  List<VideoItemModel>? itemList;

  @JsonKey(name: 'count')
  int? count;

  IssueList(this.releaseTime,this.type,this.id,this.data,this.date,this.publishTime,this.itemList,this.count,);

  factory IssueList.fromJson(Map<String, dynamic> srcJson) => _$IssueListFromJson(srcJson);

  Map<String, dynamic> toJson() => _$IssueListToJson(this);

}


